package com.company.arithmetic;

/**
 * Created by v on 16-12-19.
 */
public class Calculate {
    public static double eval(int n){
        double[] c=new double[n+1];

        double sum=1;
        c[0]=1;

        for(int i=1;i<=n;i++){
            c[i]=2.0*sum/i+i;
            sum+=c[i];
        }

        return c[n];
    }
}
